﻿using System;
using STT.Business;
using System.Data;

namespace STT.Admin.WebForms
{
    public partial class ucDanhSachNguoiDung : System.Web.UI.UserControl
    {
        DataTable tb;
        
        protected void Page_Load(object sender, EventArgs e)
        {
           
            lvDanhSachManager.DataSource = BTbDangNhap.SelectAllChatForManager(Session["TenDN"].ToString());
            lvDanhSachManager.DataBind();
            
            LoadTinNhanMoi();
        }

        void LoadTinNhanMoi()
        {
            // Lay ma hoc vien tu session
            tb = BTbChat.SelectTinNhanMoiForManager(Session["TenDN"].ToString());

            txtSoLuong.Text = tb.Rows.Count.ToString();
        }
    }
}